<!DOCTYPE html>
<meta charset="UTF-8">
<div style="margin: 10px 0;"></div>
<table id="dg" data-type="grid" title="选择框样例" style="width: 700px; height: 330px"
	data-define="rownumbers:true,singleSelect:true,
		method:'get',url: '${rc.contextPath}/assets/ui/jww/demo/testdata/grid_data1.json'
		">
	<thead>
		<tr>
			<th data-define="field:'itemid',width:80,checkbox:true">ID</th>
			<th data-define="field:'productid',width:200">产品名称</th>
			<th data-define="field:'listprice',width:80,align:'right'">成本</th>
			<th data-define="field:'unitcost',width:80,align:'right'">单价</th>
			<th data-define="field:'attr1',width:100">属性</th>
			<th data-define="field:'status',width:60,align:'center'">状态</th>
		</tr>
	</thead>
</table>
<div style="margin: 10px 0;">
	<span>选择模式: </span> <select onchange="$('#dg').grid({singleSelect:(this.value==0)})">
		<option value="0">单选</option>
		<option value="1">多选</option>
	</select><br /> 选择行自动选中checkbox:
	<input type="checkbox" checked onchange="$('#dg').grid({selectOnCheck:$(this).is(':checked')})">
	<br /> 选中checkbox自动选择行:
	<input type="checkbox" checked onchange="$('#dg').grid({checkOnSelect:$(this).is(':checked')})">
</div>
